<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style>
        *{margin: 0; padding: 0;}
        ul{
            list-style-type: none;
            width: 1000px;
            border: 1px solid #ccc;
            margin: 100px auto;
            overflow: hidden;
            padding: 20px;
        }
        ul li{
            width: 200px;
            float: left;
            padding: 0 20px;
            text-align: center;
            margin-left: 8px;
            border-right: 1px solid #ccc;
        }
        ul li img{
            width: 100%;
            height: 100%;
        }
        ul li p{
            padding: 5px 10px;
            color: #fff;
            font-size: 14px;
            background: #f60;
            margin-top: 10px;
            cursor: pointer;
        }
        #btn{
            width: 150px;
            height: 40px;
            background: purple;
            color: #fff;
            text-align: center;
            line-height: 40px;
            border: none;
            display: block;
            margin: 50px auto;
            cursor: pointer;
        }
    </style>
</head>
<body>
<input type="button" value="加载" id="btn">
<ul>
    <li>
        <!--<img src="img/asds.jpg" alt="">-->
    </li>
    <li>
        <!--<img src="img/asds.jpg" alt="">-->
    </li>
    <li>
        <!--<img src="img/asds.jpg" alt="">-->
    </li>
    <li style="border-right:none;">
        <!--<img src="img/asds.jpg" alt="">-->
    </li>
</ul>
</body>
</html>
<script>
    var arr = ["老王","老宋","老李","老张"];
    var arrImg = ["img/aaa.jpg","img/fff.jpg","img/ccc.jpg","img/eee.jpg"];
    var oBtn = document.getElementById("btn");
    var aLi = document.getElementsByTagName("li");
    oBtn.onclick = function () {
        for(var i=0;i<aLi.length;i++){
//            alert(i);
            aLi[i].innerHTML ="<img src=" + arrImg[i] + ">" + "<p>" + arr[i] + "</p>";
        }
    }
</script>